Skip to content

feat(dashboard): hide Sponsorship until there is an enquiry - #371

Open
harshtandiya wants to merge 1 commit into
version-2-dashboard-events-registrationsfrom
version-2-dashboard-minor-sponsor-hide
Open

feat(dashboard): hide Sponsorship until there is an enquiry#371
harshtandiya wants to merge 1 commit into
version-2-dashboard-events-registrationsfrom
version-2-dashboard-minor-sponsor-hide

Conversation

@harshtandiya

Copy link
Copy Markdown
Collaborator

The manage sidebar listed Sponsorship for everyone, but the section only has
anything to show once a user has filed an enquiry. The account tabs already
gate their Sponsorships tab on get_user_sponsorship_inquiries; the sidebar
now reads the same endpoint and drops the item when it comes back empty.

  • dashboard/src/data/sponsorships.tsuseMySponsorships(), v2 useCall,
    no cacheKey (it persists to IndexedDB and would outlive the session).
  • ManagerLayout.vuepersonalItems is a computed; the Sponsorship entry
    is spread in only when the call returns rows.

Gotchas:

  • /manage/sponsorship still resolves to the work-in-progress placeholder for
    anyone who types it. Hiding the item is the ask; a redirect can wait until
    the section has a real page.
  • The old e2e test reached the placeholder by clicking the sidebar item, which
    Administrator no longer sees. It now navigates directly, and a second test
    asserts the item is absent.

Not changed: the account tabs, the endpoint, or the placeholder route.

@github-actions

Copy link
Copy Markdown
Contributor

❌ UI Demo Check failed

This pull request changes the UI (2 file(s) under dashboard/src/),
but the description has no screenshot or demo. Reviewers should be able to see the
change without checking out the branch.

🛠️ How to fix

  • Edit the description and drag a screenshot or a short screen recording into it.
    Before/after images are ideal for visual tweaks.
  • Or apply the skip-demo label if a visual makes no sense here
    (pure refactor, copy change, dependency bump).

Either one re-runs this check automatically.

@greptile-apps

greptile-apps Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR conditionally shows the management sidebar’s Sponsorship entry when the current user has at least one enquiry.

  • Adds a user-scoped sponsorship enquiry data call without persistent caching.
  • Converts personal sidebar items to computed navigation based on the response.
  • Keeps direct access to the placeholder route and adds coverage for hidden navigation.

Confidence Score: 4/5

The application change appears sound, but the persistent-state-dependent browser test should be fixed before merging because valid Administrator enquiry data can fail the workflow.

The new test requires the shared Administrator account to have no sponsorship enquiries, yet its setup does not establish or clean that state; a retained enquiry correctly renders the link and breaks the assertion.

Files Needing Attention: e2e/tests/manage-access.spec.ts

Important Files Changed

Filename Overview
dashboard/src/data/sponsorships.ts Adds the uncached, user-scoped enquiry request used to determine sidebar visibility.
dashboard/src/layouts/ManagerLayout.vue Makes personal navigation reactive and includes Sponsorship only when the enquiry response contains rows.
e2e/tests/manage-access.spec.ts Preserves direct placeholder-route coverage, but the new absence assertion still depends on unarranged persistent Administrator data.

Reviews (4): Last reviewed commit: "feat(dashboard): hide Sponsorship until ..." | Re-trigger Greptile

await expect(page.getByRole("link", { name: "Talk Proposals" })).toBeVisible({
timeout: 15000,
});
await expect(page.getByRole("link", { name: "Sponsorship" })).toHaveCount(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Test assumes empty sponsorship state

This assertion relies on the shared Administrator account having no sponsorship enquiries, but the persistent test database has no setup or cleanup that establishes that state. A retained Administrator-owned enquiry correctly renders the link and makes this test fail despite valid product behavior.

Knowledge Base Used: Browser-Level E2E Test Harness

Prompt To Fix With AI
This is a comment left during a code review.
Path: e2e/tests/manage-access.spec.ts
Line: 26

Comment:
**Test assumes empty sponsorship state**

This assertion relies on the shared Administrator account having no sponsorship enquiries, but the persistent test database has no setup or cleanup that establishes that state. A retained Administrator-owned enquiry correctly renders the link and makes this test fail despite valid product behavior.

**Knowledge Base Used:** [Browser-Level E2E Test Harness](https://app.greptile.com/bwh-tech/-/custom-context/knowledge-base/bwhtech/buzz/-/docs/e2e-test-harness.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Fix in Claude Code Fix in Codex

@harshtandiya
harshtandiya force-pushed the version-2-dashboard-minor-sponsor-hide branch from bdb5ba2 to d33d98a Compare August 25, 2026 17:49
@harshtandiya
harshtandiya force-pushed the version-2-dashboard-events-registrations branch from 7463e7e to 14b0dd6 Compare August 25, 2026 17:49
@harshtandiya
harshtandiya force-pushed the version-2-dashboard-minor-sponsor-hide branch from d33d98a to ee0730e Compare August 25, 2026 20:36
@harshtandiya
harshtandiya force-pushed the version-2-dashboard-events-registrations branch from 14b0dd6 to 53eecac Compare August 25, 2026 20:36
The manage sidebar showed Sponsorship to everyone, though the section only has
something to say once a user has filed an enquiry. Follow the account tabs and
read the same endpoint, dropping the item when it comes back empty.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@harshtandiya
harshtandiya force-pushed the version-2-dashboard-minor-sponsor-hide branch from ee0730e to d881152 Compare August 25, 2026 20:47
@harshtandiya
harshtandiya force-pushed the version-2-dashboard-events-registrations branch from 53eecac to 3353f4d Compare August 25, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant